home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  4.7 KB  |  175 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Contains:    AppleScript Generic Component Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  21. __OSAGENERIC__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  25.     include 'Errors.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  30.     include 'AppleEvents.a'
  31.     ENDIF
  32. ;        include 'Types.a'                                            ;
  33. ;        include 'Memory.a'                                            ;
  34. ;            include 'MixedMode.a'                                    ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;        include 'Events.a'                                            ;
  37. ;            include 'Quickdraw.a'                                    ;
  38. ;                include 'QuickdrawText.a'                            ;
  39. ;        include 'EPPC.a'                                            ;
  40. ;            include 'AppleTalk.a'                                    ;
  41. ;            include 'Files.a'                                        ;
  42. ;                include 'Finder.a'                                    ;
  43. ;            include 'PPCToolbox.a'                                    ;
  44. ;            include 'Processes.a'                                    ;
  45. ;        include 'Notification.a'                                    ;
  46.  
  47.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  48.     include 'OSA.a'
  49.     ENDIF
  50. ;        include 'AEObjects.a'                                        ;
  51. ;        include 'Components.a'                                        ;
  52. ;     NOTE:    This interface defines a "generic scripting component."
  53. ;            The Generic Scripting Component allows automatic dispatch to a
  54. ;            specific scripting component that conforms to the OSA interface.
  55. ;            This component supports OSA, by calling AppleScript or some other 
  56. ;            scripting component.  Additionally it provides access to the default
  57. ;            and the user-prefered scripting component.
  58. ;
  59.  
  60. ; Component version this header file describes 
  61. kGenericComponentVersion        EQU        $0100
  62.  
  63. kGSSSelectGetDefaultScriptingComponent EQU        $1001
  64. kGSSSelectSetDefaultScriptingComponent EQU        $1002
  65. kGSSSelectGetScriptingComponent    EQU        $1003
  66. kGSSSelectGetScriptingComponentFromStored EQU        $1004
  67. kGSSSelectGenericToRealID        EQU        $1005
  68. kGSSSelectRealToGenericID        EQU        $1006
  69. kGSSSelectOutOfRange            EQU        $1007
  70.  
  71. ; typedef OSType             ScriptingComponentSelector
  72. ; typedef OSAID             GenericID
  73. ; get and set the default scripting component 
  74. ;
  75. ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  76. ;
  77.     IF ¬ GENERATINGCFM THEN
  78.         Macro
  79.         _OSAGetDefaultScriptingComponent
  80.             dc.w     $2F3C
  81.             dc.w     $0004
  82.             dc.w     $1001
  83.             moveq    #0,d0
  84.             dc.w     $A82A
  85.         EndM
  86.     ELSE
  87.         IMPORT_CFM_FUNCTION    OSAGetDefaultScriptingComponent
  88.     ENDIF
  89.  
  90. ;
  91. ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  92. ;
  93.     IF ¬ GENERATINGCFM THEN
  94.         Macro
  95.         _OSASetDefaultScriptingComponent
  96.             dc.w     $2F3C
  97.             dc.w     $0004
  98.             dc.w     $1002
  99.             moveq    #0,d0
  100.             dc.w     $A82A
  101.         EndM
  102.     ELSE
  103.         IMPORT_CFM_FUNCTION    OSASetDefaultScriptingComponent
  104.     ENDIF
  105.  
  106. ; get a scripting component instance from its subtype code 
  107. ;
  108. ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  109. ;
  110.     IF ¬ GENERATINGCFM THEN
  111.         Macro
  112.         _OSAGetScriptingComponent
  113.             dc.w     $2F3C
  114.             dc.w     $0008
  115.             dc.w     $1003
  116.             moveq    #0,d0
  117.             dc.w     $A82A
  118.         EndM
  119.     ELSE
  120.         IMPORT_CFM_FUNCTION    OSAGetScriptingComponent
  121.     ENDIF
  122.  
  123. ; get a scripting component selector (subType) from a stored script 
  124. ;
  125. ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  126. ;
  127.     IF ¬ GENERATINGCFM THEN
  128.         Macro
  129.         _OSAGetScriptingComponentFromStored
  130.             dc.w     $2F3C
  131.             dc.w     $0008
  132.             dc.w     $1004
  133.             moveq    #0,d0
  134.             dc.w     $A82A
  135.         EndM
  136.     ELSE
  137.         IMPORT_CFM_FUNCTION    OSAGetScriptingComponentFromStored
  138.     ENDIF
  139.  
  140. ; get a real component instance and script id from a generic id 
  141. ;
  142. ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  143. ;
  144.     IF ¬ GENERATINGCFM THEN
  145.         Macro
  146.         _OSAGenericToRealID
  147.             dc.w     $2F3C
  148.             dc.w     $0008
  149.             dc.w     $1005
  150.             moveq    #0,d0
  151.             dc.w     $A82A
  152.         EndM
  153.     ELSE
  154.         IMPORT_CFM_FUNCTION    OSAGenericToRealID
  155.     ENDIF
  156.  
  157. ; get a generic id from a real component instance and script id 
  158. ;
  159. ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  160. ;
  161.     IF ¬ GENERATINGCFM THEN
  162.         Macro
  163.         _OSARealToGenericID
  164.             dc.w     $2F3C
  165.             dc.w     $0008
  166.             dc.w     $1006
  167.             moveq    #0,d0
  168.             dc.w     $A82A
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION    OSARealToGenericID
  172.     ENDIF
  173.  
  174.     ENDIF ; __OSAGENERIC__
  175.